package com.uzai.console.service.user;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.uzai.console.dto.user.blacklist.marketingrewards.MarketingRewardsBlackListBatchDto;
import com.uzai.console.dto.user.blacklist.marketingrewards.MarketingRewardsBlackListOptDto;
import com.uzai.console.dto.user.blacklist.marketingrewards.MarketingRewardsBlackListQuery;
import com.uzai.console.vo.user.blacklist.marketingrewards.MarketingRewardsBlackListVO;

/**
 * The interface Marketing rewards black list service.
 *
 * @author mingyang.chen create in 2023/4/13 18:46
 */
public interface MarketingRewardsBlackListService {

    /**
     * 分页查询营销奖励黑名单
     *
     * @param query the query
     * @return page
     */
    Page<MarketingRewardsBlackListVO> page(MarketingRewardsBlackListQuery query);

    /**
     * 添加营销奖励黑名单
     *
     * @param optDto the opt dto
     * @return boolean
     */
    Boolean add(MarketingRewardsBlackListOptDto optDto);

    Boolean addHandleRemarkIfPresent(MarketingRewardsBlackListOptDto optDto);

    /**
     * 删除营销奖励黑名单
     * <p>
     * 可当做移除和名单
     *
     * @param merId the mer id
     * @param wxId  the wx id
     * @return boolean
     */
    Boolean remove(Long merId, String wxId);

    /**
     * Remove boolean.
     *
     * @param id the id
     * @return the boolean
     */
    Boolean remove(String id);

    /**
     * 是否在黑名单中
     *
     * @param wxid  the wxid
     * @param merId the mer id
     * @return string
     */
    String isInBlackList(String wxid, Long merId);

    /**
     * 根据标识新增或删除黑名单
     *
     * @param merId the mer id
     * @param wxId  the wx id
     * @param flag  the flag
     */
    void addOrRemoveByFlag(Long merId, String wxId, String remark, Integer flag);

    void addOrRemoveByFlag(Long merId, String wxId, String remark, Integer flag, Integer subNotPassFriend);

    Object batchSetSubNotPassFriend(MarketingRewardsBlackListBatchDto batchDto);
}
